#!/bin/bash
# Automates process of compiling, running sim_accels.  Also logs output
# to a file marked with date in folder GAIAFOLDER/c/logs/simulations
##################################################################
#Copyright 2010 Bryan Killett
#
#This file is part of GAIA.
#
#GAIA is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#GAIA is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with GAIA. If not, see <http://www.gnu.org/licenses/>.
##################################################################

#Compile sim_accels
make sim_accels

#Log filename
logname=log-$(date +%F-%H-%M-%S).txt

#Run sim_accels
./sim_accels.out >& ../output/simulations/logs/$logname &
sleep 1
tail -f ../output/simulations/logs/$logname
